<script src="__JS__/jquery.min.js"></script>
<link rel="stylesheet" href="__JS__/layui/css/layui.css" media="all">
<style>
    .layui-input-block{
        margin-left: 20px !important;
    }
</style>
<form id="dasdasdasd" class="layui-form" action="">
    <div style="width: calc(100% - 40px);margin: 20px;height: 175px;">
        <textarea name="auto_reply_text" placeholder="请输入回复内容" style="padding:10px;width: 100%;resize: none;height: 100%;">{$reply_info.auto_reply_text}</textarea>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="file" name="single_img" class="layui-upload-file" id="qrcode">
            <input type="hidden" id="qr" name="auto_reply_img" value="{$reply_info.auto_reply_img}" />
            <div style="margin-top: 20px;width:200px;position: relative;" class="qrcode_img">
                {neq name="$reply_info.auto_reply_img" value=""} 
                    <img id = "reply_img" style="width:100%;" src="{$reply_info.auto_reply_img}" alt="">
                {/neq}
            </div>
        </div>
    </div>
</form>
<script>
    // 定义全局JS变量
    var GV = {
        current_controller: "admin/{$controller|default=''}/",
        base_url: "__STATIC__"
    };

    var del = '<div class="del" style="display: inline-block;position: absolute;bottom: 0;width: 100%;height: 38px;line-height:38px;text-align: center;background-color:rgba(0,0,0,0.3);color: #fff;cursor: pointer;" onclick="move_img();">删&nbsp;&nbsp;除</div>';
    $('.qrcode_img').hover(function(){
        $('.qrcode_img').append(del);
    },function(){
        $('.del').remove();
    });

    function move_img(){
        $('#reply_img').remove();
        $('.del').remove();
        $('#qr').val('');
    }
</script>
<script src="__JS__/layui/lay/dest/layui.all.js"></script>
<script src="__JS__/admin.js"></script>